Digitally controlled pulse width modulation (PWM) is increasingly finding application in high frequency, high timing resolution systems. One example is a Time of Photonic Flight determining sub-system (also referred to as a TOF sub-system or LIDAR sub-system). Such sub-systems may be used for example in three-dimensional (3D) augmented reality systems. The digital control of the PWM may be a programmable one where programming allows for risky settings.